Integrand size = 25, antiderivative size = 115 \[ \int \cot ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=\frac {(a-b)^{3/2} \arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f}+\frac {(3 a-4 b) \cot (e+f x) \sqrt {a+b \tan ^2(e+f x)}}{3 f}-\frac {a \cot ^3(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{3 f} \]
[Out]
Time = 0.21 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3751, 485, 597, 12, 385, 209} \[ \int \cot ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=\frac {(a-b)^{3/2} \arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f}-\frac {a \cot ^3(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{3 f}+\frac {(3 a-4 b) \cot (e+f x) \sqrt {a+b \tan ^2(e+f x)}}{3 f} \]
[In]
[Out]
Rule 12
Rule 209
Rule 385
Rule 485
Rule 597
Rule 3751
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (a+b x^2\right )^{3/2}}{x^4 \left (1+x^2\right )} \, dx,x,\tan (e+f x)\right )}{f} \\ & = -\frac {a \cot ^3(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{3 f}+\frac {\text {Subst}\left (\int \frac {-a (3 a-4 b)-(2 a-3 b) b x^2}{x^2 \left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tan (e+f x)\right )}{3 f} \\ & = \frac {(3 a-4 b) \cot (e+f x) \sqrt {a+b \tan ^2(e+f x)}}{3 f}-\frac {a \cot ^3(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{3 f}-\frac {\text {Subst}\left (\int -\frac {3 a (a-b)^2}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tan (e+f x)\right )}{3 a f} \\ & = \frac {(3 a-4 b) \cot (e+f x) \sqrt {a+b \tan ^2(e+f x)}}{3 f}-\frac {a \cot ^3(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{3 f}+\frac {(a-b)^2 \text {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {(3 a-4 b) \cot (e+f x) \sqrt {a+b \tan ^2(e+f x)}}{3 f}-\frac {a \cot ^3(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{3 f}+\frac {(a-b)^2 \text {Subst}\left (\int \frac {1}{1-(-a+b) x^2} \, dx,x,\frac {\tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f} \\ & = \frac {(a-b)^{3/2} \arctan \left (\frac {\sqrt {a-b} \tan (e+f x)}{\sqrt {a+b \tan ^2(e+f x)}}\right )}{f}+\frac {(3 a-4 b) \cot (e+f x) \sqrt {a+b \tan ^2(e+f x)}}{3 f}-\frac {a \cot ^3(e+f x) \sqrt {a+b \tan ^2(e+f x)}}{3 f} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.43 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.68 \[ \int \cot ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=-\frac {\cot (e+f x) \left (b+a \cot ^2(e+f x)\right ) \operatorname {Hypergeometric2F1}\left (-\frac {3}{2},1,-\frac {1}{2},-\frac {(a-b) \tan ^2(e+f x)}{a+b \tan ^2(e+f x)}\right ) \sqrt {a+b \tan ^2(e+f x)}}{3 f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(666\) vs. \(2(101)=202\).
Time = 4.79 (sec) , antiderivative size = 667, normalized size of antiderivative = 5.80
method | result | size |
default | \(-\frac {\left (4 \sin \left (f x +e \right )^{2} \sqrt {a -b}\, \sqrt {\frac {a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, b -3 \sin \left (f x +e \right ) a^{2} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \left (\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {a -b}}\right ) \cos \left (f x +e \right )+6 \sin \left (f x +e \right ) a b \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \left (\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {a -b}}\right ) \cos \left (f x +e \right )-3 \sin \left (f x +e \right ) b^{2} \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \left (\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {a -b}}\right ) \cos \left (f x +e \right )+4 \cos \left (f x +e \right )^{2} \sqrt {a -b}\, \sqrt {\frac {a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, a +3 \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \left (\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {a -b}}\right ) a^{2} \sin \left (f x +e \right )-6 \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \left (\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {a -b}}\right ) a b \sin \left (f x +e \right )+3 \arctan \left (\frac {\sqrt {\frac {a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, \left (\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )}{\sqrt {a -b}}\right ) b^{2} \sin \left (f x +e \right )-3 \sqrt {a -b}\, \sqrt {\frac {a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b}{\left (\cos \left (f x +e \right )+1\right )^{2}}}\, a \right ) \left (a +b \tan \left (f x +e \right )^{2}\right )^{\frac {3}{2}} \cot \left (f x +e \right )^{3}}{3 f \sqrt {a -b}\, \left (a \cos \left (f x +e \right )^{2}+b \sin \left (f x +e \right )^{2}\right ) \sqrt {\frac {a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b}{\left (\cos \left (f x +e \right )+1\right )^{2}}}}\) | \(667\) |
[In]
[Out]
none
Time = 0.37 (sec) , antiderivative size = 308, normalized size of antiderivative = 2.68 \[ \int \cot ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=\left [-\frac {3 \, {\left (a - b\right )} \sqrt {-a + b} \log \left (-\frac {{\left (a^{2} - 8 \, a b + 8 \, b^{2}\right )} \tan \left (f x + e\right )^{4} - 2 \, {\left (3 \, a^{2} - 4 \, a b\right )} \tan \left (f x + e\right )^{2} + a^{2} - 4 \, {\left ({\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{3} - a \tan \left (f x + e\right )\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {-a + b}}{\tan \left (f x + e\right )^{4} + 2 \, \tan \left (f x + e\right )^{2} + 1}\right ) \tan \left (f x + e\right )^{3} - 4 \, {\left ({\left (3 \, a - 4 \, b\right )} \tan \left (f x + e\right )^{2} - a\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a}}{12 \, f \tan \left (f x + e\right )^{3}}, \frac {3 \, {\left (a - b\right )}^{\frac {3}{2}} \arctan \left (-\frac {2 \, \sqrt {b \tan \left (f x + e\right )^{2} + a} \sqrt {a - b} \tan \left (f x + e\right )}{{\left (a - 2 \, b\right )} \tan \left (f x + e\right )^{2} - a}\right ) \tan \left (f x + e\right )^{3} + 2 \, {\left ({\left (3 \, a - 4 \, b\right )} \tan \left (f x + e\right )^{2} - a\right )} \sqrt {b \tan \left (f x + e\right )^{2} + a}}{6 \, f \tan \left (f x + e\right )^{3}}\right ] \]
[In]
[Out]
\[ \int \cot ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=\int \left (a + b \tan ^{2}{\left (e + f x \right )}\right )^{\frac {3}{2}} \cot ^{4}{\left (e + f x \right )}\, dx \]
[In]
[Out]
\[ \int \cot ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=\int { {\left (b \tan \left (f x + e\right )^{2} + a\right )}^{\frac {3}{2}} \cot \left (f x + e\right )^{4} \,d x } \]
[In]
[Out]
Timed out. \[ \int \cot ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \cot ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^{3/2} \, dx=\int {\mathrm {cot}\left (e+f\,x\right )}^4\,{\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\right )}^{3/2} \,d x \]
[In]
[Out]